using UnityEngine;
using UFrame.Setting;

[RequireComponent(typeof(Light))]
public class LightStrengthSetting : FloatSettingBinding
{
    private Light m_light;

    protected override int PreferID
    {
        get { return SettingID.LIGHT_STRENGTH; }
    }

    protected override UFrame.Setting.ISettingCtrl SettingCtrl
    {
        get
        {
            return SettingAgent.Instance;
        }
    }

    private void Awake()
    {
        m_light = GetComponent<Light>();
    }

    protected override void OnSettingValueChanged(float floatValue)
    {
        m_light.intensity = floatValue;
    }
}
